In C++, the Scope Operator (::) acts like a precise GPS, telling the compiler exactly which namespace to search. However, typing std:: repeatedly is like writing your full legal name every time you speak. We use using declarations to create local synonyms.
1. The using Declaration
A using declaration allows us to access a name from another namespace without the prefix. It follows the format: using namespace_name::name;. Each declaration must terminate with a semicolon. Once declared, the name is in scope from the point of declaration to the end of the local scope (like a function block) or global scope (the file level).
2. Header Hygiene & Guards
To support separate compilation, we use Header Guards. These prevent the preprocessor from including the same file multiple times, which would cause "redefinition" errors. Using #ifndef (if not defined), #define, and #endif ensures a header is processed only once.
#includes them, a using declaration in a header forces that name into every including file's scope, risking silent name collisions.